{"componentChunkName":"component---node-modules-rocketseat-gatsby-theme-docs-core-src-templates-docs-query-js","path":"/manual-review/ExchangeHandlerFacet-EHF","result":{"data":{"mdx":{"id":"a1a3da0a-dda2-577d-a5c2-c6c61ec91c5f","excerpt":"EHF-01M: Breaking Change of Single-Point-of-Entry Type Severity Location Logical Fault ExchangeHandlerFacet.sol:L76 ,  L127 Description: The…","fields":{"slug":"/manual-review/ExchangeHandlerFacet-EHF/"},"frontmatter":{"title":"ExchangeHandlerFacet Manual Review Findings","description":"Contains all the findings that relate to manual review on the contract codebase","image":null,"disableTableOfContents":null},"body":"var _excluded = [\"components\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/* @jsxRuntime classic */\n\n/* @jsx mdx */\nvar _frontmatter = {\n  \"title\": \"ExchangeHandlerFacet Manual Review Findings\",\n  \"description\": \"Contains all the findings that relate to manual review on the contract codebase\"\n};\nvar layoutProps = {\n  _frontmatter: _frontmatter\n};\nvar MDXLayout = \"wrapper\";\nreturn function MDXContent(_ref) {\n  var components = _ref.components,\n      props = _objectWithoutProperties(_ref, _excluded);\n\n  return mdx(MDXLayout, _extends({}, layoutProps, props, {\n    components: components,\n    mdxType: \"MDXLayout\"\n  }), mdx(\"h2\", {\n    \"id\": \"span-idehf-01mehf-01m-breaking-change-of-single-point-of-entryspan\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h2\",\n    \"href\": \"#span-idehf-01mehf-01m-breaking-change-of-single-point-of-entryspan\",\n    \"aria-label\": \"span idehf 01mehf 01m breaking change of single point of entryspan permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), mdx(\"span\", {\n    id: \"EHF-01M\"\n  }, \"EHF-01M: Breaking Change of Single-Point-of-Entry\")), mdx(\"table\", null, mdx(\"thead\", {\n    parentName: \"table\"\n  }, mdx(\"tr\", {\n    parentName: \"thead\"\n  }, mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Type\"), mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Severity\"), mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Location\"))), mdx(\"tbody\", {\n    parentName: \"table\"\n  }, mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"a\", {\n    parentName: \"td\",\n    \"href\": \"/reports/boson-protocol-version-2.3-64c3b2cf1570d80014096fc3/appendix/finding-types#logical-fault\"\n  }, \"Logical Fault\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"img\", {\n    parentName: \"td\",\n    \"className\": \"o-severity o-unknown\",\n    \"src\": \"https://omniscia.io/report-assets/unknown.png\"\n  })), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"a\", {\n    parentName: \"td\",\n    \"href\": \"https://github.com/bosonprotocol/boson-protocol-contracts/blob/02a4d2ff04832a4607674ba37708d4f52cdac4fa/contracts/protocol/facets/ExchangeHandlerFacet.sol#L76\"\n  }, \"ExchangeHandlerFacet.sol:L76\"), \", \", mdx(\"a\", {\n    parentName: \"td\",\n    \"href\": \"https://github.com/bosonprotocol/boson-protocol-contracts/blob/02a4d2ff04832a4607674ba37708d4f52cdac4fa/contracts/protocol/facets/ExchangeHandlerFacet.sol#L127\"\n  }, \"L127\"))))), mdx(\"h3\", {\n    \"id\": \"description\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#description\",\n    \"aria-label\": \"description permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Description:\"), mdx(\"p\", null, \"The \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://github.com/bosonprotocol/boson-protocol-contracts/blob/02a4d2ff04832a4607674ba37708d4f52cdac4fa/contracts/protocol/facets/ExchangeHandlerFacet.sol#L76-L96\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"a\"\n  }, \"ExchangeHandlerFacet::commitToOffer\")), \" function was the single point of entry of the particular facet for committing to offers within the Boson Protocol system.\"), mdx(\"p\", null, \"A new feature around enhanced token gating split the functionality of committing to offers to two implementations; \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://github.com/bosonprotocol/boson-protocol-contracts/blob/02a4d2ff04832a4607674ba37708d4f52cdac4fa/contracts/protocol/facets/ExchangeHandlerFacet.sol#L76-L96\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"a\"\n  }, \"ExchangeHandlerFacet::commitToOffer\")), \" and \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://github.com/bosonprotocol/boson-protocol-contracts/blob/02a4d2ff04832a4607674ba37708d4f52cdac4fa/contracts/protocol/facets/ExchangeHandlerFacet.sol#L127-L166\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"a\"\n  }, \"ExchangeHandlerFacet::commitToConditionalOffer\")), \". The issue with the original implementation is that it will currently \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"revert\"), \" if the commit cannot occur due to the offer being part of a group with a condition.\"), mdx(\"h3\", {\n    \"id\": \"impact\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#impact\",\n    \"aria-label\": \"impact permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Impact:\"), mdx(\"p\", null, \"The severity of this exhibit depends on the current adoption of the Boson Protocol system and whether the Boson Protocol team has reached out to these parties to verify that the upgrade is compatible with their systems.\"), mdx(\"h3\", {\n    \"id\": \"example\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#example\",\n    \"aria-label\": \"example permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Example:\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-sol\",\n    \"metastring\": \"title=contracts/protocol/facets/ExchangeHandlerFacet.sol highlight={17} lineNumbers=true lineOffset=75\",\n    \"title\": \"contracts/protocol/facets/ExchangeHandlerFacet.sol\",\n    \"highlight\": \"{17}\",\n    \"lineNumbers\": \"true\",\n    \"lineOffset\": \"75\"\n  }, \"function commitToOffer(\\n    address payable _buyer,\\n    uint256 _offerId\\n) external payable override exchangesNotPaused buyersNotPaused nonReentrant {\\n    // Make sure buyer address is not zero address\\n    require(_buyer != address(0), INVALID_ADDRESS);\\n\\n    Offer storage offer = getValidOffer(_offerId);\\n\\n    // For there to be a condition, there must be a group.\\n    (bool exists, uint256 groupId) = getGroupIdByOffer(offer.id);\\n    if (exists) {\\n        // Get the condition\\n        Condition storage condition = fetchCondition(groupId);\\n\\n        // Make sure group doesn't have a condition. If it does, use commitToConditionalOffer instead.\\n        require(condition.method == EvaluationMethod.None, GROUP_HAS_CONDITION);\\n    }\\n\\n    commitToOfferInternal(_buyer, offer, 0, false);\\n}\\n\\n\")), mdx(\"h3\", {\n    \"id\": \"recommendation\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#recommendation\",\n    \"aria-label\": \"recommendation permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Recommendation:\"), mdx(\"p\", null, \"As the Boson Protocol system has most likely been integrated by external parties, these external parties will no longer be able to interact with conditional offers via the \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://github.com/bosonprotocol/boson-protocol-contracts/blob/02a4d2ff04832a4607674ba37708d4f52cdac4fa/contracts/protocol/facets/ExchangeHandlerFacet.sol#L76-L96\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"a\"\n  }, \"ExchangeHandlerFacet::commitToOffer\")), \" function that may lead to significant consequences depending on whether those parties possess upgradeable code or not.\"), mdx(\"p\", null, \"We advise the \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://github.com/bosonprotocol/boson-protocol-contracts/blob/02a4d2ff04832a4607674ba37708d4f52cdac4fa/contracts/protocol/facets/ExchangeHandlerFacet.sol#L76-L96\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"a\"\n  }, \"ExchangeHandlerFacet::commitToOffer\")), \" function to redirect its call to \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://github.com/bosonprotocol/boson-protocol-contracts/blob/02a4d2ff04832a4607674ba37708d4f52cdac4fa/contracts/protocol/facets/ExchangeHandlerFacet.sol#L127-L166\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"a\"\n  }, \"ExchangeHandlerFacet::commitToConditionalOffer\")), \" with a \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"_tokenId\"), \" of \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"0\"), \", permitting a variety of conditions to still be satisfied.\"), mdx(\"p\", null, \"In general, the new per-token-ID-commit token gating feature should be backwards-compatible with the original restriction system and assume default values for the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"_tokenId\"), \" if it is unspecified.\"), mdx(\"h3\", {\n    \"id\": \"alleviation-2b9f60b6c3\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#alleviation-2b9f60b6c3\",\n    \"aria-label\": \"alleviation 2b9f60b6c3 permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Alleviation (2b9f60b6c3):\"), mdx(\"p\", null, \"The Boson Protocol team stated that they do not wish to expose the same functionality across two different functions and that they consider the change safe to apply to the system in its current state.\"), mdx(\"p\", null, \"We would like to state that the Boson Protocol team has not confirmed that integrators of their systems will adequately react to this non-backwards-compatible change and we advise the Boson Protocol team to proactively reach out to potentially affected parties rather than dealing with them after-the-fact.\"), mdx(\"h3\", {\n    \"id\": \"alleviation-584e7d054c\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#alleviation-584e7d054c\",\n    \"aria-label\": \"alleviation 584e7d054c permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Alleviation (584e7d054c):\"), mdx(\"p\", null, \"The Boson Protocol team re-evaluated this exhibit and stated that the sole integrators of their system at its current state are internal and have been prepared for this change.\"), mdx(\"p\", null, \"As such, we consider this exhibit nullified.\"), mdx(ViewDiffButton, {\n    repoUrl: \"https://github.com/bosonprotocol/boson-protocol-contracts\",\n    mainHash: \"02a4d2ff04832a4607674ba37708d4f52cdac4fa\",\n    fixHash: \"584e7d054c1198ed4b95edbf970de0d6c47a3fcc\",\n    gitHubIssue: \"796\",\n    mdxType: \"ViewDiffButton\"\n  }), mdx(\"h2\", {\n    \"id\": \"span-idehf-02mehf-02m-restrictive-migration-mechanismspan\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h2\",\n    \"href\": \"#span-idehf-02mehf-02m-restrictive-migration-mechanismspan\",\n    \"aria-label\": \"span idehf 02mehf 02m restrictive migration mechanismspan permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), mdx(\"span\", {\n    id: \"EHF-02M\"\n  }, \"EHF-02M: Restrictive Migration Mechanism\")), mdx(\"table\", null, mdx(\"thead\", {\n    parentName: \"table\"\n  }, mdx(\"tr\", {\n    parentName: \"thead\"\n  }, mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Type\"), mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Severity\"), mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Location\"))), mdx(\"tbody\", {\n    parentName: \"table\"\n  }, mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"a\", {\n    parentName: \"td\",\n    \"href\": \"/reports/boson-protocol-version-2.3-64c3b2cf1570d80014096fc3/appendix/finding-types#language-specific\"\n  }, \"Language Specific\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"img\", {\n    parentName: \"td\",\n    \"className\": \"o-severity o-informational\",\n    \"src\": \"https://omniscia.io/report-assets/informational.png\"\n  })), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"a\", {\n    parentName: \"td\",\n    \"href\": \"https://github.com/bosonprotocol/boson-protocol-contracts/blob/02a4d2ff04832a4607674ba37708d4f52cdac4fa/contracts/protocol/facets/ExchangeHandlerFacet.sol#L38\"\n  }, \"ExchangeHandlerFacet.sol:L38\"))))), mdx(\"h3\", {\n    \"id\": \"description-1\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#description-1\",\n    \"aria-label\": \"description 1 permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Description:\"), mdx(\"p\", null, \"The \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"ExchangeHandlerFacet\"), \" introduces an upgrade to the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"BosonVoucher\"), \" identification system, however, the way the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"ExchangeHandlerFacet\"), \" differentiates between the two is based on a \\\"snapshot\\\" \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"EXCHANGE_ID_2_2_0\"), \" beyond which IDs are assumed to be of the new representation format.\"), mdx(\"h3\", {\n    \"id\": \"impact-1\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#impact-1\",\n    \"aria-label\": \"impact 1 permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Impact:\"), mdx(\"p\", null, \"This exhibit acts as a warning of a potential caveat of the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"EXCHANGE_ID_2_2_0\"), \" system that the Boson Protocol may not be aware of as well as a way to make the distinction between legacy and new-style IDs more robust.\"), mdx(\"h3\", {\n    \"id\": \"example-1\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#example-1\",\n    \"aria-label\": \"example 1 permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Example:\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-sol\",\n    \"metastring\": \"title=contracts/protocol/facets/ExchangeHandlerFacet.sol highlight={2} lineNumbers=true lineOffset=36\",\n    \"title\": \"contracts/protocol/facets/ExchangeHandlerFacet.sol\",\n    \"highlight\": \"{2}\",\n    \"lineNumbers\": \"true\",\n    \"lineOffset\": \"36\"\n  }, \"constructor(uint256 _firstExchangeId2_2_0) {\\n    EXCHANGE_ID_2_2_0 = _firstExchangeId2_2_0;\\n}\\n\")), mdx(\"h3\", {\n    \"id\": \"recommendation-1\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#recommendation-1\",\n    \"aria-label\": \"recommendation 1 permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Recommendation:\"), mdx(\"p\", null, \"While this approach is correct, it will misbehave if the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"ExchangeHandlerFacet\"), \" and \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"BosonVoucher\"), \" implementations are not upgraded properly.\"), mdx(\"p\", null, \"Namely, the exchange and buyer regions of the protocol will have to be paused before the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"BosonVoucher\"), \" implementations are upgraded as otherwise vouchers may be issued between a protocol update and its execution, causing the minted IDs to be improperly parsed.\"), mdx(\"p\", null, \"Alternatively, the code could differentiate between the new and legacy type IDs by evaluating the upper 128 bits of the ID. If the upper 128 bits are zero, then it is of the legacy type as a zero-value offer ID is not possible.\"), mdx(\"h3\", {\n    \"id\": \"alleviation-2b9f60b6c3323fd234b570089ceff924cdb5851c\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#alleviation-2b9f60b6c3323fd234b570089ceff924cdb5851c\",\n    \"aria-label\": \"alleviation 2b9f60b6c3323fd234b570089ceff924cdb5851c permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Alleviation (2b9f60b6c3323fd234b570089ceff924cdb5851c):\"), mdx(\"p\", null, \"The Boson Protocol team stated that they will apply proper upgrade procedures to ensure that the ID system does not become corrupt in-between upgrades.\"), mdx(\"p\", null, \"Furthermore, they stated that a legacy ID evaluation system was experimented but was deemed to complex and gas-expensive for a production environment.\"), mdx(\"p\", null, \"As such, we consider this exhibit alleviated \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"based on the fact that the Boson Protocol team will follow proper upgrade procedures for their contracts\"), \".\"), mdx(ViewDiffButton, {\n    repoUrl: \"https://github.com/bosonprotocol/boson-protocol-contracts\",\n    mainHash: \"02a4d2ff04832a4607674ba37708d4f52cdac4fa\",\n    fixHash: \"2b9f60b6c3323fd234b570089ceff924cdb5851c\",\n    gitHubIssue: \"0\",\n    mdxType: \"ViewDiffButton\"\n  }), mdx(\"h2\", {\n    \"id\": \"span-idehf-03mehf-03m-bypass-of-token-specific-conditionsspan\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h2\",\n    \"href\": \"#span-idehf-03mehf-03m-bypass-of-token-specific-conditionsspan\",\n    \"aria-label\": \"span idehf 03mehf 03m bypass of token specific conditionsspan permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), mdx(\"span\", {\n    id: \"EHF-03M\"\n  }, \"EHF-03M: Bypass of Token Specific Conditions\")), mdx(\"table\", null, mdx(\"thead\", {\n    parentName: \"table\"\n  }, mdx(\"tr\", {\n    parentName: \"thead\"\n  }, mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Type\"), mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Severity\"), mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Location\"))), mdx(\"tbody\", {\n    parentName: \"table\"\n  }, mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"a\", {\n    parentName: \"td\",\n    \"href\": \"/reports/boson-protocol-version-2.3-64c3b2cf1570d80014096fc3/appendix/finding-types#logical-fault\"\n  }, \"Logical Fault\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"img\", {\n    parentName: \"td\",\n    \"className\": \"o-severity o-major\",\n    \"src\": \"https://omniscia.io/report-assets/major.png\"\n  })), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"a\", {\n    parentName: \"td\",\n    \"href\": \"https://github.com/bosonprotocol/boson-protocol-contracts/blob/02a4d2ff04832a4607674ba37708d4f52cdac4fa/contracts/protocol/facets/ExchangeHandlerFacet.sol#L148-L154\"\n  }, \"ExchangeHandlerFacet.sol:L148-L154\"), \", \", mdx(\"a\", {\n    parentName: \"td\",\n    \"href\": \"https://github.com/bosonprotocol/boson-protocol-contracts/blob/02a4d2ff04832a4607674ba37708d4f52cdac4fa/contracts/protocol/facets/ExchangeHandlerFacet.sol#L156-L158\"\n  }, \"L156-L158\"))))), mdx(\"h3\", {\n    \"id\": \"description-2\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#description-2\",\n    \"aria-label\": \"description 2 permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Description:\"), mdx(\"p\", null, \"As par of the condition overhaul supporting range-based token gating with limited commits per unique token ID, the \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://github.com/bosonprotocol/boson-protocol-contracts/blob/02a4d2ff04832a4607674ba37708d4f52cdac4fa/contracts/protocol/facets/ExchangeHandlerFacet.sol#L982-L1018\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"a\"\n  }, \"ExchangeHandlerFacet::authorizeCommit\")), \" function takes an extra \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"_tokenId\"), \" argument that is not validated whereas previously it was utilizing the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"_condition.tokenId\"), \".\"), mdx(\"p\", null, \"While the \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://github.com/bosonprotocol/boson-protocol-contracts/blob/02a4d2ff04832a4607674ba37708d4f52cdac4fa/contracts/protocol/facets/ExchangeHandlerFacet.sol#L190-L229\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"a\"\n  }, \"ExchangeHandlerFacet::commitToPreMintedOffer\")), \" function will automatically utilize the correct \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"tokenId\"), \" value based on the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"condition\"), \", the \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://github.com/bosonprotocol/boson-protocol-contracts/blob/02a4d2ff04832a4607674ba37708d4f52cdac4fa/contracts/protocol/facets/ExchangeHandlerFacet.sol#L127-L166\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"a\"\n  }, \"ExchangeHandlerFacet::commitToConditionalOffer\")), \" does not perform this check. As such, it is possible for a group that is meant to be satisfied by a specific NFT ID to be satisfied by any.\"), mdx(\"h3\", {\n    \"id\": \"impact-2\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#impact-2\",\n    \"aria-label\": \"impact 2 permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Impact:\"), mdx(\"p\", null, \"A \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"Condition\"), \" that is \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"MultiToken\"), \" and has a \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"Threshold\"), \" or that is a \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"SpecificToken\"), \" condition will not evaluate properly in the \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://github.com/bosonprotocol/boson-protocol-contracts/blob/02a4d2ff04832a4607674ba37708d4f52cdac4fa/contracts/protocol/facets/ExchangeHandlerFacet.sol#L127-L166\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"a\"\n  }, \"ExchangeHandlerFacet::commitToConditionalOffer\")), \" function in the current iteration of the codebase and can be trivially bypassed.\"), mdx(\"h3\", {\n    \"id\": \"example-2\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#example-2\",\n    \"aria-label\": \"example 2 permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Example:\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-sol\",\n    \"metastring\": \"title=contracts/protocol/facets/ExchangeHandlerFacet.sol highlight={18,22,23,24,25,26,27,28,30,31,32,34} lineNumbers=true lineOffset=126\",\n    \"title\": \"contracts/protocol/facets/ExchangeHandlerFacet.sol\",\n    \"highlight\": \"{18,22,23,24,25,26,27,28,30,31,32,34}\",\n    \"lineNumbers\": \"true\",\n    \"lineOffset\": \"126\"\n  }, \"function commitToConditionalOffer(\\n    address payable _buyer,\\n    uint256 _offerId,\\n    uint256 _tokenId\\n) external payable override exchangesNotPaused buyersNotPaused nonReentrant {\\n    // Make sure buyer address is not zero address\\n    require(_buyer != address(0), INVALID_ADDRESS);\\n\\n    Offer storage offer = getValidOffer(_offerId);\\n\\n    // For there to be a condition, there must be a group.\\n    (bool exists, uint256 groupId) = getGroupIdByOffer(offer.id);\\n\\n    // Make sure the group exists\\n    require(exists, NO_SUCH_GROUP);\\n\\n    // Get the condition\\n    Condition storage condition = fetchCondition(groupId);\\n\\n    require(condition.method != EvaluationMethod.None, GROUP_HAS_NO_CONDITION);\\n\\n    if (condition.length >= 1) {\\n        // If condition has length >= 1, check that the token id is in range\\n        require(\\n            _tokenId >= condition.tokenId && _tokenId < condition.tokenId + condition.length,\\n            TOKEN_ID_NOT_IN_CONDITION_RANGE\\n        );\\n    }\\n\\n    if (condition.method == EvaluationMethod.Threshold && condition.tokenType != TokenType.MultiToken) {\\n        require(_tokenId == 0, INVALID_TOKEN_ID);\\n    }\\n\\n    bool allow = authorizeCommit(_buyer, condition, groupId, _tokenId);\\n\")), mdx(\"h3\", {\n    \"id\": \"recommendation-2\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#recommendation-2\",\n    \"aria-label\": \"recommendation 2 permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Recommendation:\"), mdx(\"p\", null, \"We advise the code of \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://github.com/bosonprotocol/boson-protocol-contracts/blob/02a4d2ff04832a4607674ba37708d4f52cdac4fa/contracts/protocol/facets/ExchangeHandlerFacet.sol#L127-L166\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"a\"\n  }, \"ExchangeHandlerFacet::commitToConditionalOffer\")), \" function to be updated, either ensuring that the input \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"_tokenId\"), \" has been correctly specified or overwriting it with the correct value based on the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"condition\"), \" of the group being evaluated.\"), mdx(\"h3\", {\n    \"id\": \"alleviation-2b9f60b6c3323fd234b570089ceff924cdb5851c-1\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#alleviation-2b9f60b6c3323fd234b570089ceff924cdb5851c-1\",\n    \"aria-label\": \"alleviation 2b9f60b6c3323fd234b570089ceff924cdb5851c 1 permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Alleviation (2b9f60b6c3323fd234b570089ceff924cdb5851c):\"), mdx(\"p\", null, \"The code of \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://github.com/bosonprotocol/boson-protocol-contracts/blob/2b9f60b6c3323fd234b570089ceff924cdb5851c/contracts/protocol/facets/ExchangeHandlerFacet.sol#L127-L166\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"a\"\n  }, \"ExchangeHandlerFacet::commitToConditionalOffer\")), \" was updated to properly evaluate whether a \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"SpecificToken\"), \" evaluation method or a token type of \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"MultiToken\"), \" has been specified and to validate the provided \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"_tokenId\"), \" in such a case.\"), mdx(\"p\", null, \"As such, we consider this exhibit fully alleviated.\"), mdx(ViewDiffButton, {\n    repoUrl: \"https://github.com/bosonprotocol/boson-protocol-contracts\",\n    mainHash: \"02a4d2ff04832a4607674ba37708d4f52cdac4fa\",\n    fixHash: \"2b9f60b6c3323fd234b570089ceff924cdb5851c\",\n    gitHubIssue: \"727\",\n    mdxType: \"ViewDiffButton\"\n  }));\n}\n;\nMDXContent.isMDXComponent = true;","headings":[{"depth":2,"value":"<span id=\"EHF-01M\">EHF-01M: Breaking Change of Single-Point-of-Entry</span>"},{"depth":3,"value":"Description:"},{"depth":3,"value":"Impact:"},{"depth":3,"value":"Example:"},{"depth":3,"value":"Recommendation:"},{"depth":3,"value":"Alleviation (2b9f60b6c3):"},{"depth":3,"value":"Alleviation (584e7d054c):"},{"depth":2,"value":"<span id=\"EHF-02M\">EHF-02M: Restrictive Migration Mechanism</span>"},{"depth":3,"value":"Description:"},{"depth":3,"value":"Impact:"},{"depth":3,"value":"Example:"},{"depth":3,"value":"Recommendation:"},{"depth":3,"value":"Alleviation (2b9f60b6c3323fd234b570089ceff924cdb5851c):"},{"depth":2,"value":"<span id=\"EHF-03M\">EHF-03M: Bypass of Token Specific Conditions</span>"},{"depth":3,"value":"Description:"},{"depth":3,"value":"Impact:"},{"depth":3,"value":"Example:"},{"depth":3,"value":"Recommendation:"},{"depth":3,"value":"Alleviation (2b9f60b6c3323fd234b570089ceff924cdb5851c):"}]}},"pageContext":{"slug":"/manual-review/ExchangeHandlerFacet-EHF/","prev":{"label":"ConfigHandlerFacet.sol (CHF-M)","link":"/manual-review/ConfigHandlerFacet-CHF"},"next":{"label":"GroupBase.sol (GBE-M)","link":"/manual-review/GroupBase-GBE"}}},"staticQueryHashes":["1954253342","2328931024","2501019404","973074209"]}